<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>父传子</title>
</head>

<body>
    <div id="app">
        <child :name="msg"></child>
    </div>
</body>
<script src="https://static.iamflame.top/cdn/javascript/vue@2.js"></script>
<script>
    Vue.component('child', {
        props: ['name'],
        template: '<div>父组件的值，{{name}}</div>'
    })
    let vm = new Vue({
        el: "#app",
        data() {
            return {
                msg: "hello,这是父组件传过来的！！"
            }
        }
    })

</script>

</html>